<div class="page_wrap section_inner clearfix">
    <div class="page_nav">
        <ul>
        <?php
			$count = 0;
			$cms_category_default = NULL;
			foreach ($cms_categories as $cms_category)
			{
				if (!$cms_category_default)
					$cms_category_default = $cms_category;
				$count ++;
		?>
            <li>
                <a href="<? echo url_for('careers/permalink?cms_category_id='.$cms_category['cms_category_id'].'')?>" class="<?php echo ($count == 1)?"first active":"" ?> w4l_internal_link"><?php echo $cms_category['name']; ?></a>
            </li>
        <?php
			}
		?>
        </ul>
      	<a href="<?php echo url_for("cooperations");?>" class="button button_special cta w4l_internal_link">
      		<i></i>
      		<span class="button_label">Hợp tác &amp; Bảng giá</span>
      		<b></b>
    	</a>
        <a href="<?php echo url_for("contact"); ?>" class="button cta w4l_internal_link">
          	<i></i>
          	<span class="button_label">Liên hệ</span>
          	<b></b>
        </a>
    </div>
    <div class="page_container page_full_width">
        <div class="page_header clearfix">
            <h1><? echo $cms_category_default['name'] ?></h1>
        </div>
        <div class="page_content">
            <div class="page_section">
                <?
				if (!isset($cms_list) || count($cms_list) == 0)
				{
					echo "Thông tin đang được cập nhật. Quý khách vui lòng vào lại sau.";
				}
				else
				{
					foreach ($cms_list as $cms_obj)
					{
						if (count($cms_list) == 1)
						{
							include("cms_view.php");
						}
						else 
						{
						?>
                            <div style='padding:5px 0;'>
                                <div class='feature_caption'>
                                    <a href='<? echo url_for('news/permalink?cms_category_id='.$cms_category['cms_category_id'].'&cms_id='.$cms_obj['cms_id'])?>'>
                                        <img src='/uploads/cms/<?=$cms_obj['picture']?>' />
                                    </a>
                                </div>
                                <div class='feature_content'>
                                    <h4>
                                        <a href='<? echo url_for('news/permalink?cms_category_id='.$cms_category['cms_category_id'].'&cms_id='.$cms_obj['cms_id'])?>'>
                                            <?=$cms_obj['name']?>
                                        </a>
                                    </h4>
                                    <div>
                                        <?=$cms_obj['description']?>
                                    </div>
                                </div>
                                <div style='clear:both'></div>
                            </div>
						<?
						}
					}
				}
				?>
            </div>
        </div>
    </div>
</div>